/* ------------------------------ _bootstrap.js ----------------------------- */
(function() {
   // Disable HC detection in WebKit. (#5429)
   if ( VED.env.webkit )
      VED.env.hc = false;
   else {
      // Check whether high contrast is active by creating a colored border.
      var hcDetect = VED.dom.element.createFromHtml( '<div style="width:0px;height:0px;position:absolute;left:-10000px;' +
         'border: 1px solid;border-color: red blue;"></div>', VED.document );

      hcDetect.appendTo( VED.document.getHead() );

      // Update VED.env.
      // Catch exception needed sometimes for FF. (#4230)
      try {
         VED.env.hc = hcDetect.getComputedStyle( 'border-top-color' ) == hcDetect.getComputedStyle( 'border-right-color' );
      } catch ( e ) {
         VED.env.hc = false;
      }

      hcDetect.remove();
   }

   if ( VED.env.hc )
      VED.env.cssClass += ' ved_hc';

   // Initially hide UI spaces when relevant skins are loading, later restored by skin css.
   VED.document.appendStyleText( '.ved{visibility:hidden;}' );

   // Mark the editor as fully loaded.
   VED.status = 'loaded';
   VED.fireOnce( 'loaded' );

   // Process all instances created by the "basic" implementation.
   var pending = VED._.pending;
   if ( pending ) {
      delete VED._.pending;

      for ( var i = 0; i < pending.length; i++ ) {
         VED.editor.prototype.constructor.apply( pending[ i ][ 0 ], pending[ i ][ 1 ] );
         VED.add( pending[ i ][ 0 ] );
      }
   }
})();




